package com.qk.management.aop.anno;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

@Retention(RUNTIME)
@Target(ElementType.METHOD)
public @interface Cacheable {
    // 缓存key的前缀
    String keyPrefix() default "";
    //过期时间
    long expire() default 60;
    //过期时间单位
    TimeUnit timeUnit() default TimeUnit.SECONDS;
}
